home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form MAINFORM
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "GBLIB2.EXE Demonstration. Press F1 for Help"
- ClientHeight = 1350
- ClientLeft = 2700
- ClientTop = 3915
- ClientWidth = 5850
- Height = 2040
- Icon = MAINFORM.FRX:0000
- Left = 2640
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 1350
- ScaleWidth = 5850
- Top = 3285
- Width = 5970
- Begin CommandButton btn_ReadRegData
- Caption = "Read &EXE Information"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 3480
- TabIndex = 4
- Top = 720
- Width = 2235
- End
- Begin CommandButton btn_WriteRegData
- Caption = "Write E&XE Information"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 3480
- TabIndex = 1
- Top = 120
- Width = 2235
- End
- Begin CommandButton btn_SYSDIR
- Caption = "&SYSDIR"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 2160
- TabIndex = 3
- Top = 720
- Width = 1215
- End
- Begin CommandButton btn_WINDIR
- Caption = "&WINDIR"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 2160
- TabIndex = 0
- Top = 120
- Width = 1215
- End
- Begin CommandButton btn_MakeAKey
- Caption = "Ma&keakey"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 840
- TabIndex = 2
- Top = 720
- Width = 1215
- End
- Begin CommandButton btn_Exit
- Cancel = -1 'True
- Caption = "E&xit"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 840
- TabIndex = 5
- Top = 120
- Width = 1215
- End
- Begin Label lbl_Copyright
- Alignment = 2 'Center
- BackColor = &H00C0C0C0&
- Caption = "(c)1995 [GB]"
- Height = 435
- Left = 60
- TabIndex = 6
- Top = 720
- Width = 735
- WordWrap = -1 'True
- End
- Begin Image img_Icon
- BorderStyle = 1 'Fixed Single
- Height = 510
- Left = 180
- Picture = MAINFORM.FRX:0302
- Top = 120
- Width = 510
- End
- Begin Menu mfile
- Caption = "&File"
- Begin Menu mfile_Exit
- Caption = "E&xit"
- End
- Begin Menu mfile_About
- Caption = "&About"
- End
- End
- Option Explicit
- ' /* Modified 31/12/94 [GB] */
- ' /* Created 31/12/94 [GB] */
- ' //Form variable for messages//
- Dim msg As String
- Sub btn_Exit_Click ()
- ' /* Modified 30/12/94 [GB] */
- ' /* Created 30/12/94 [GB] */
- End Sub
- Sub btn_MakeAKey_Click ()
- ' /* Modified 31/12/94 [GB] */
- ' /* Created 31/12/94 [GB] */
- Dim Answer As Long
- Dim sz As String
- sz = InputBox$("Type in a string", "MakeAKey Demo", "Gordon Bamber")
- ' //Simple function. Possible crosscheck on USERNAME/USERORG? //
- ' //Result has to be a Long Integer Type//
- Answer = MakeAKey(sz)
- MsgBox "Key generated is " & Format$(Answer), 64, "MakeAKey"
- End Sub
- Sub btn_ReadRegData_Click ()
- ' /* Modified 31/12/94 [GB] */
- ' /* Created 31/12/94 [GB] */
- ' //Read the data into the two GLOBALs//
- ' //Quit out in development mode//
- If IsVBRunning() = 0 Then
- GetDataFromEXE
- DevMsg
- Exit Sub
- End If
- ' //Reading a 'virgin' EXE file?//
- If USERNAME = "UNLICENSED" Or USERNAME = "" Then
- MsgBox "This is an unbranded version of REGMAX", 64 + 4096, "Registration Information"
- Exit Sub
- End If
- ' //Display embedded registration information//
- msg = "This software was registered" & Chr$(10)
- msg = msg & "on: " & BRANDDATE & Chr$(10)
- msg = msg & "to: " & USERNAME & Chr$(10)
- msg = msg & "of: " & USERORG
- MsgBox msg, 64 + 4096, "Registration Information"
- End Sub
- Sub btn_SYSDIR_Click ()
- ' /* Modified 30/12/94 [GB] */
- ' /* Created 30/12/94 [GB] */
- ' //A use for this would be in help/support, where//
- ' //you could show the client where his windows directory is//
- ShowSysDir
- End Sub
- Sub btn_WINDIR_Click ()
- ' /* Modified 30/12/94 [GB] */
- ' /* Created 30/12/94 [GB] */
- ' //A use for this would be in help/support, where//
- ' //you could show the client where his windows directory is//
- ShowWinDir
- End Sub
- Sub btn_WriteRegData_Click ()
- ' /* Modified 30/12/94 [GB] */
- ' /* Created 30/12/94 [GB] */
- ' //Quit out in development mode//
- If IsVBRunning() <> 0 Then
- DevMsg
- Exit Sub
- End If
- ' //Hide the main form//
- Me.Hide
- ' //Show regform non-modally//
- regform.Show
- End Sub
- Sub Form_Load ()
- ' /* Modified 02/01/95 [GB] */
- ' //Place the form correctly on the screen//
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
- ' //Skip the following if in development mode//
- If IsVBRunning() = 0 Then
- ' //Get the GLOBALS//
- GetDataFromEXE
- ' //Is it a 'virgin' EXE? //
- If USERNAME = "UNLICENSED" Then
- MsgBox "This is an unlicensed copy of REGMAX", 64 + 4096, "Registration Information"
- Exit Sub
- End If
- ' //Display embedded registration information//
- msg = "This software was registered" & Chr$(10)
- msg = msg & "on: " & BRANDDATE & Chr$(10)
- msg = msg & "to: " & USERNAME & Chr$(10)
- msg = msg & "of: " & USERORG
- MsgBox msg, 64 + 4096, "Registration Information"
- btn_WriteRegData.Enabled = False
- End If
- End Sub
- Sub mfile_About_Click ()
- ' /* Modified 03/01/95 [GB] */
- ' /* Created 03/01/95 [GB] */
- msg = "The REGMAX/GBLIB2 Project" & Chr$(10) & Chr$(10)
- msg = msg & "Source code Copyright" & Chr$(10)
- msg = msg & "(c)1994/5 Gordon Bamber" & Chr$(10) & Chr$(10)
- msg = msg & "Distributed to Visual Basic V3.0" & Chr$(10)
- msg = msg & "developers as FREEWARE"
- MsgBox msg, 64, "About"
- End Sub
- Sub mfile_Exit_Click ()
- ' /* Modified 03/01/95 [GB] */
- ' /* Created 03/01/95 [GB] */
- End Sub
-